package com.lzh.persevere.controller;

import com.lzh.persevere.common.R;
import com.lzh.persevere.common.ResultUtil;
import com.lzh.persevere.model.vo.menu.MenuVO;
import com.lzh.persevere.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 权限controller
 *
 * @author luzhiheng
 * @since 2025-07-30
 */
@Api(tags = "权限")
@RestController
@RequestMapping("/menu")
public class MenuController {

    @Resource
    private MenuService menuService;

    @ApiOperation(value = "查询权限列表")
    @PostMapping("/findMenuList")
    public R<List<MenuVO>> findMenuList() {
        return ResultUtil.success(menuService.findMenuList());
    }

//    @ApiOperation(value = "编辑权限")
//    @PostMapping("/editMenu")
//    public R<Boolean> editMenu(@Valid @RequestBody EditRoleRO ro) {
//        return ResultUtil.success(menuService.editMenu(ro));
//    }
//
//    @ApiOperation(value = "新增权限")
//    @PostMapping("/addMenu")
//    public R<Boolean> addMenu(@Valid @RequestBody Role ro) {
//        return ResultUtil.success(menuService.save(ro));
//    }
//
//    @ApiOperation(value = "删除权限")
//    @PostMapping("/deleteMenu")
//    public R<Boolean> deleteMenu(@Valid @RequestBody IdRO ro) {
//        return ResultUtil.success(menuService.deleteMenu(ro.getId()));
//    }

}
